﻿#include <iostream>
#include <sstream>
#include <iomanip>
using namespace std;
void zhengshu(int a);
void xiaoshu(double a);
int main(void)
{	
	double d;
	cin >> d;
	char c = getchar();

	if (c == '/') //区分分数和其他数字；
	{
		char e[20];
		cin.getline(e,10);
		stringstream sstr(e);
		int z;
		sstr >> z;
		int a = d;
		//cout << fixed << d << c << e;
		zhengshu(a);
		cout << '/';
		zhengshu(z);
		return 0;
	}
	
	if (c == '\n')//区分百分数和普通数字；
	{
		int	a = d;
		if (a == d) //区分小数和整数——整数情况
		{
			zhengshu(a);
		}
		else // 区分小数和整数——小数情况
		{
			double dd = 0.0;
			stringstream ss;
			ss << d;
			ss >> a >> dd;
			//cout << a << endl <<dd;
			//分别转换整数和小数；
			zhengshu(a);
			cout << '.';
			xiaoshu(dd);

		}
	}
	else //区分百分数和整数——小数情况；
	{
		int a = d;
		zhengshu(a);
		cout << '%' << endl;
	}
	
	return 0;
}
void xiaoshu(double a)
{
	int c = 0, t = 0,cnt = 0;
	while (t != a)//int t = a*10;如果t == a 则退出循环，得到cnt；
	{
		a *= 10;
		t = a;
		cnt++;
	}
	//cout << cnt;
	int t1 = t, cnt2 = 0;
	while (t1 != 0)
	{
		t1 /= 10;
		cnt2++;
	}
	for (int i = 0;i < (cnt - cnt2);i++)
	{
		t *= 10;
	}
	int m = 0;
	for (int i = 0;i < cnt;i++)
	{
		m = t % 10;
		t /= 10;
		c = c * 10 + m;
	}
	cout << c;
}

void zhengshu(int a)
{
	int t = 0, cnt = 0, b = a;
	while (b != 0)
	{
		b /= 10;
		cnt++;
	}
	//cout << cnt << b;
	int c = 0;
	for (int i = 0;i < cnt;i++)
	{
		t = a % 10;
		a /= 10;
		c = c * 10 + t;
	}
	cout << c;
}